{#

 This file is part of the FOSCommentBundle package.

 (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>

 This source file is subject to the MIT license that is bundled
 with this source code in the file LICENSE.

#}

<div id="fos_comment_thread"></div>

{% javascripts '@FOSCommentBundle/Resources/assets/js/comments.js' %}
<script type="text/javascript">
// thread id
var fos_comment_thread_id = '{{ id }}';

// api base url to use for initial requests
var fos_comment_thread_api_base_url = '{{ path('fos_comment_get_threads') }}';

// Snippet for asynchronously loading the comments
(function() {
    var fos_comment_script = document.createElement('script');
    fos_comment_script.async = true;
    fos_comment_script.src = '{{ asset_url }}';
    fos_comment_script.type = 'text/javascript';

    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(fos_comment_script);
})();
</script>
{% endjavascripts %}
